package filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author Mc.Chai
 * @program: JavaWeb
 * @create 2022-04-07-21:55 21:55
 */
@WebFilter("/index.jsp")
public class FilterDemo4 implements Filter {
    @Override
    public void destroy() {
    }

    @Override
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("filterDemo4  来了");
        chain.doFilter(req, resp);
        System.out.println("filterDemo4 回来");
    }

    @Override
    public void init(FilterConfig config) throws ServletException {

    }

}
